package com.blogspot.javagamexyz.gamexyz.custom;

import java.util.Random;

public class CardDeck {

	private int[] deck;
    private int  draws;
   
    public CardDeck(){
        deck = new int[54];
        draws = 0;
        for(int i=0; i<deck.length; i++){
            deck[i] = i + 1;
        }
        shuffle();
    }
   
    public void shuffle(){
        int index, temp;

        Random r = new Random();
        for (int i=(deck.length - 1); i>0; i--){
            index = r.nextInt(i + 1);
            temp = deck[index];
            deck[index] = deck[i];
            deck[i] = temp;
        }
    }
}
